how_tofandomcom-20200214-history
How to replace microdrive with compactflash in Palm LifeDrive
The Palm LifeDrive uses an internal 4GB microdrive, which is partitioned into a 64MB storage heap, a 22MB "ROM" image, and a 3.73GB user volume. To the user, the 64MB appears as program & data memory and the 3.73GB as the "LifeDrive" volume. The 22MB "ROM" image is hidden. Older Palms like the Palm V used SDRAM as program & data RAM, which required power to maintain storage. If the batteries ran down, all user data & software would be lost. More recent Palms like the Palm TX use non-volatile flash memory for program & data memory, thus safeguarding against data loss if the batteries run down. The LifeDrive design utilizes a Hitachi 4GB microdrive instead of any flash memory. Namely, a 64MB partition of the microdrive is used as the program and data storage space. While this retains the advantage of non-volatile program & data storage, this introduces a slight lag occasionally during normal use, as the microdrive is spun up & down frequently to conserve power. As well, the need to spin the microdrive platter limits the battery life of the LifeDrive. Lastly, microdrives are sensitive to external shocks, and aren't as robust as flash memory. As a possible hack to improve battery life, performance and reliability, some users have attempted to replace the internal 4GB microdrive with compact flash cards. Initially, many such efforts weren't successful, as these modified LD units wouldn't boot off of a CF, even after a byte-for-byte image of the original MD was written to the CF. However, LD users at a discussion at 1src.com found a successful combination of hardware and software steps that led to success. This document will describe the successful methods used in replacing the LD microdrive with a compact flash card, as well as some unsuccessful methods. Hopefully, other LD users can learn and contribute to the general body of knowledge. Materials & tools needed * a Palm LifeDrive (obviously!) * a T5 torx wrench (3/64" flat screwdriver may work too) * a compatible 4GB compact flash card * a computer with some way of to read/write CF cards, such as: ** USB CF reader ** CF to IDE adapter ** digital camera with CF slot, connected to the computer via USB * a knife (optional) * small flat head screwdriver (optional) * small pair of pliers (optional) Compatible CF cards Many CF cards do not seem to work with this procedure. Firstly, the CF will need to be 4GB, as the LifeDrive OS blindly assumes there to be 4GB. Secondly, the Palm OS will only boot successfully if the cylinder/head/sector values of the CF are "compatible" with that of the original microdrive. The Hitachi microdrive has a CHS of 7936/16/63. The SanDisk 4GB CF Model # SDCFH-4096-388 has been known to work, and it reports a CHS of 7940/16/63. This is not to be confused with the SanDisk 4GB CF Model # SDCFH-4096-901, which reports a CHS of 1019/127/62, and may not work. It seems that as long as the head/sector count match, and the number of CF cylinders exceeds 7936, that's good enough for the Palm OS to boot properly. (How to find one card's CHS?) Some people have had success using fdisk in expert mode to reformat CF cards into the right CHS configuration. (How?) There is some confusion in that some card models will work fine for this hack for some users, but not for some others. There are some reports of fake CF cards being sold at unusually low prices. These fake cards may appear real, and may even show the correct unused capacity. However, attempting to fill the card to capacity (as we are doing when we write the raw disk image onto the card) will fail. Here's a link to a page that talks about identifying fake CF cards. My recommendation is to avoid CF cards being sold at unusually low prices, in case they are fake cards. There have been cases where a card listed below as compatible may not work for another user, and vice versa. In the perfect world, every CF card of the same model number would either work or not work for this hack. However, cards may be mislabeled, or there have have been other issues that have contributed to the varying degree of success. Therefore, we may not be able to definitively say that a certain card is compatible or not. Some cards with the right CHS configuration have been reported *not* to work. Apparently, the only consistent difference between working and non-working cards with the right CHS is in IORDY. This can be viewed in Linux with the "hdparm -I" command. Bad ones will say "IORDY(may be)(cannot be disabled)". Follow this thread on 1src for more info. List of compatible CF cards People have reported success using the following cards: * Dane-Elec 4GB Adorama * Jessops 4GB * Patriot Signature 4GB Compact Flash (CF) Flash Media Model PSF4G50CF NewEgg or THNCF4G09PG(T01CA), or preformatted at Used PDA Parts * SanDisk 4GB (SDCFB-4096-A10, -E10) * SanDisk Ultra II 4 GB (Model # SDCFH-4096-388 CHS of 7940/16/63; Model # SDCFH-4096-902; Model # SDCFH-4096-AC11 CostCo) * SanDisk Extreme III 4GB (SDCFX3-4096-901 (Adorama) & SDCFX3-4096-902 (Hey, this link does not prove it works, but the oppposite! Who said it works?)) * Toshiba 4G (model # THNCF4G09QG) http://forum.palmattitude.org/index.php?showtopic=34822&st=500 Not Compatible CF cards People have reported failure using the following cards: * ACP-EP 4GB 120x User post @ 1src * Dane-Elec 4GB AMC4G10STLA2DA21A (Made in Taiwan, probably a fake) * Dane-Elec 512MB * Dane-Elec 133Xs 4GB * Extrememory 4GB Performance 80x * Kingston 2GB Elite Pro 50x * Kingston 4GB Elite Pro 45x User post @ 1src * Kingston 4GB-SFE Elite Pro 45x * Kingston 4GB Ultimate 133x # CHS 8060/16/63 http://www.1src.com/forums/showthread.php?p=1000503&posted=1#post1000503 * Lexar 256MB (10x, 12x, 16x) * Lexar 512MB * Panda 4GB 66x * Pretec 4GB 133x * PQI 1GB * PQI 4GB 100x * SanDisk 2GB Ultra II * SanDisk Ultra II 4GB (Model # SDCFH-4096-901 CHS of 1019/127/62) * SanDisk EXTREME III 4GB (Model # SDCFX3-4096-904 CHS of 1023/128/62) * TwinMos 4GB 140X * brFlash fc-4.0GB (CHS of 7996/16/63, but still no go) http://www.eshopbrflash.com.br/ Quick steps Caution! Readers are warned that opening the case of their LD will void any warranties. Mucking about with the LD in ways described in this document may ruin your LD and/or data. Take all necessary precautions, read the directions and resources thoroughly and good luck. Hot-sync your LD to backup your programs and data. Also note that hot-sync's alone do not completely backup all data on your LifeDrive volume. One way to backup the LifeDRive volume is to launch the LifeDrive Manager, right-click on the LifeDrive volume and select the Save to PC... option. If your 4GB LifeDrive volume contains a lot of files, this save may take a while. If you have your LD connected to a Linux PC, it may be useful to set your LD in Drive Mode and run the following command from Linux: :dmesg > /usr/ld-dmesg.log This will dump useful information about the microdrive of your LifeDrive, such as which /dev/* handle your Linux box connects with to your LD. In order to duplicate the microdrive onto the compact flash drive, we need to make a byte-for-byte duplicate. You cannot simply just use your operating system's copy command to do this, as you want to duplicate the boot sectors, the partition boundaries, etc instead of just the directory structure & files. The linux dd command is perfectly suited for this task. If you have Windows, it would be useful to install CygWin (http://cygwin.com) or some other Linux type utilities, as much of the directions in this document will use Linux commands. It is also possible to boot from a live Linux CD to gain access to Linux utilities. It's been reported that some versions of the dd utility allow you to do this: :dd --list This should show the proper addresses of your devices, such as "\\?\Device\Harddisk3\DR15". You can also use "dd for windows" from the RawWrite suite. It may also be possible to use Norton Ghost to as well. Full steps Hot-sync & backup contents of LifeDrive volume :While no one has reported catastrophic data loss from attempting this hack, why be the first? Since we are mucking around with the microdrive that contains both program data & the LifeDrive volume, you must perform a hot-sync and also backup the LifeDrive volume to your computer. This will ensure that even if you need to buy a replacement LifeDrive if you ruin this LifeDrive, your data will be safe. Disassemble LifeDrive, remove microdrive :Turn off your LD, and slide the power switch to the Locked OFF position. This will prevent the LD from powering up from button presses during disassembly. It probably wouldn't hurt to check that you don't have any LD alarms scheduled to go off during your disassembly time. :Follow these LifeDrive disassembly instructions to remove the microdrive from the LifeDrive. Work slowly and carefully. Don't forget to take precautions against static electricity discharges from your body to your device, especially in cold dry environments! :Carefully unplug the battery connector from the mainboard, taking note of which way the connector fits in the socket. This step is optional, but some people seem to have better luck with their LD restarting successfully after disconnecting and reconnecting the battery. Copy microdrive onto compact flash :Plug the microdrive into your CF reader in order to create a disk image of the microdrive. Depending on your computer, the exact steps needed to do this may vary. If you have a Windows machine, you can install CygWin to get the needed utilities. :One user has reported that their CF reader would not read/write properly unless the computer was rebooted with the CF or MD already inserted in the CF reader. A way to check if your microdrive is "seen" by your computer is at the Start, "Run...", command line, type the command "diskmgmt.msc". If you can see the partitions in the MD or Flash Disk, then you can proceed with the dd command. :Some users have reported that not all CF readers allow reading or writing of files over 2GB in size. USB CF readers seem to be more problematic that IDE to CF adapters. :Disk encryption software on the host used to make the copies can be problematic, :Making a copy can take over 90 minutes. Be patient. Hint: When copying the microdrive to the image file, progress can be checked by doing a detail directory listing and looking at the file size. When copying to the flash, you just have to be patient, and use the time needed to create the image file as a rough guide. Be aware that the time needed to write the image onto the CF may far exceed the time needed to read the image from the MD, because of differences in MD-read and CF-write speeds. Linux and Windows CygWin * Insert microdrive into CF reader. * Mount the microdrive using: (note: those using Cygwin may not need this step) :: mount -f -b /dev/sda /mnt/ldmd :: Caution! Be carefully with this step, because "sda" should be your primary HDD if you are running CygWin under WinXP. It may cause your primary HDD data to get lost!!! If you have a second HDD it should be "sdb" and so on. Then CF adaptor may be "sdb" if you have only one HDD, or "sdc" is you have a second HDD and so on. :: Note: the input path of your CF reader may differ from /dev/sda. You may need to experiment ONLY READING AT FIRST with /dev/sdb or /dev/hda etc. TO IDENTIFY THE RIGHT DEVICE PRIOR TO BEGIN ANY WRITING * Create image of the contents of the microdrive: :: dd if=/mnt/ldmd of=/usr/ldmd-image :: Caution! Be careful with this step, because an accidental reversal of if and of parameters will result in your microdrive being overwritten! :: Depending on your CF reader's speed, this step may take an hour or more. :: This will create a 4GB /usr/ldmd-image file of your microdrive. * Unmount microdrive from filesystem: :: umount /mnt/ldmd * Unplug microdrive from PC, plug compact flash into PC * Mount the CF card using:(note: again, those using Cygwin do not need to mount) :: mount -f -b /dev/sda /mnt/ldcf :: Note: the input path of your CF reader may differ from /dev/sda. You may need to experiment with /dev/sdb or /dev/hda etc. * Write image onto compact flash. :: dd if=/usr/ldmd-image of=/mnt/ldcf :: Depending on your CF reader's speed, this step may take several hours. * Unmount compact flash from filesystem: :: umount /mnt/ldcf dd on Linux Debian distribution * Insert microdrive into CF reader. * Create image of the contents of the microdrive: :: dd if=/dev/sda of=ldmd-image * Unplug microdrive from PC, plug compact flash into PC * Write image onto compact flash. :: dd if=ldmd-image of=/dev/sda :: Caution! Be carefully with this step, because "sda" should be your primary HDD if you are running CygWin under WinXP. It may cause your primary HDD data to get lost!!! If you have a second HDD it should be "sdb" and so on. Then CF adaptor may be "sdb" if you have only one HDD, or "sdc" is you have a second HDD and so on. :: Note: Please adjust /dev/sda to match your setting Much Smaller Compressed Image File :One user reports one way to reduce the size of the image file using these different steps: *Perform a secure hard reset on the LD before disassembly. As this will completely wipe EVERYTHING from your LD, you'll want to backup everything you don't want to lose! *continue with usual directions, but create the image of the microdrive using: ::dd if=/mnt/ldmd | zip > /usr/ldmd-image.Z ::Since the vast majority of the microdrive after a hard reset is blank, the resulting compressed image file will be about 20MB *Continue with usual directions, but write image onto CF using: ::zcat /usr/ldmd-image.Z | dd of=/mnt/ldmd dd for Windows by RawWrite :Here are the steps to take if you're using the "dd for windows" tool in the RawWrite suite. :To get the compact flash's virtual address. ::dd --list ::Win32 Available Volume Information ::\\.\Volume{7108dfbc-9b87-11d9-a4eb-00110986b81c}\ ::link to \\?\Device\Harddisk2\DP(1)0-0+d ::removeable media ::Mounted on k:\ ::\\?\Device\Harddisk2\Partition0 ::link to \\?\Device\Harddisk2\DR18 <--- this is the LifeDrive ::Removable media other than floppy. Block size = 512 :To make an image of the compact flash to the file named ldmd.img :(if=input file; of=output file) ::dd if=\\?\Device\Harddisk2\DR18 of=ldmd.img --progress ::rawwrite dd for windows version 0.3. ::Written by John Newbigin ::This program is covered by the GPL. See copying.txt for details ::4,095,737,856 ::7999488+0 records in ::7999488+0 records out :To write the image from the file named ldmd.img to the compact flash :(if=input file; of=output file) ::dd of=\\?\Device\Harddisk2\DR18 if=ldmd.img --progress] ::rawwrite dd for windows version 0.3. ::Written by John Newbigin ::This program is covered by the GPL. See copying.txt for details ::4,095,737,856 ::7999488+0 records in ::7999488+0 records out Mac OSX :NOTE dd for Mac is already a part of osx and can be accessed from applications/utilities/terminal :Steps are similar to Linux steps. Here is a brief summary of differences: *Before plugging the microdrive to Mac, plug in the CF. Type: ::mount ::This should reveal the mount location of your CF reader, such as /dev/disk3s1 *Eject the CF and plug in the microdrive *OSX will suggest formatting the microdrive. Decline this offer for obvious reasons. (specifically, choose ignore) *Use dd to copy the image to the hard disk: ::dd if=/dev/disk3 of=/ldmd.img Note: Omit the s1 in the above example as this is a partition. Must be just /disk3 (or the number of your disk) *Take out the MD and pop in the CF. *OSX will automount it, so umount it using: ::sudo umount /dev/disk3s1 Must use the sudo command here, or it will deny you access. Also, merely ejecting drive will give you another error. Use sudo, or unmount in the disk utility. *Use dd to write the image back to the CF: ::dd if=/ldmd.img of=/dev/disk3 *Take the CF out of the reader. Reassemble LifeDrive with compact flash card * Insert the CF into the LifeDrive's CF connector. * Fit the blue rubber spacers around the CF. One forum userExplanation of how to fit blue spacers back onto CF explained how: "If you'll check the inside part of the rubbers, there's a groove/overhang for the top layer of the microdrive. The Sandisk compact flash fits under this groove nicely, except for the side opposite the connector. I just wedged (read: inserted firmly) the card under that overhang then tuck it in the plastic frame." * One forum user Report by user of how spacers solved problem reports that their LD MD wouldn't spin up, much less boot up unless the spacers were holding the MD away from the LD mainboard. This might suggest that CF cards may not work within the LD unless the spacers are in place to prevent a faulty electrical contact. * Reconnect the battery connector, if you unplugged it earlier. * Finish reassembling the LD. * Power on the LD. You may need to do a soft reset after the power on. * If the LD works with the CF, then a soft reset will complete in under 30 seconds, compared to the usual 2.5 minutes with a microdrive. * If the LD stays on the PALM screen for several minutes with a steady nonblinking LED, then it's likely that it couldn't boot properly from the CF. ::Some users reported success after doing a hard reset of the LD with the CF at this point. If the LD returns to normal operation after a hard reset, then you can recover all of your LD data by using the hot-sync and backup on your computer. ::Another suggestion is to disassemble your LD, unplug the battery and then reconnect the battery after several hours and finish reassembling. Some users have reported that this helps get past the frozen boot screen. Further Considerations Power consumption summary: :Hitachi MD: ::standby (head parked, platter stopped): 13mA ::idle (platter spinning): 85mA ::read: 360 mA ::write: 280 mA ::max: 372 mA :SanDisk CF: ::sleep: 1.2 mA ::read: 55 mA ::write: 70mA ::max: 100mA ::From: ::Hitachi microdrive specs ::SanDisk compact flash specs Flash memory limited writes :Flash memory has a finite number of writes per block. =See also= * LifeDrive Howtos * Howto disassemble a LifeDrive